package com.hengda.museumonline.adapter;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import com.hengda.museumonline.R;

/**
 * @author：JFWU on 2016/9/26 18:36
 * @E-mail：jeffy12138@126.com
 */
public class SearchingAdapter extends RecyclerView.Adapter<SearchingAdapter.ListHolder> {
    private Context context;

    public SearchingAdapter(Context context) {
        this.context = context;
    }
    @Override
    public SearchingAdapter.ListHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        View view = LayoutInflater.from(context).inflate( R.layout.searching_item , parent, false);
        return new ListHolder(view);
    }

    @Override
    public void onBindViewHolder(SearchingAdapter.ListHolder holder, int position) {
        holder.setData(position);
    }

    @Override
    public int getItemCount() {
        return 100;
    }

    class ListHolder extends RecyclerView.ViewHolder {
        ImageView avatar;
        TextView name;

        public ListHolder(View itemView) {
            super(itemView);
            avatar = (ImageView) itemView.findViewById(R.id.avatar);
            name = (TextView) itemView.findViewById(R.id.tv_name);
        }

        public void setData(int position) {

        }


    }
}
